package com.training.java.core.collections.laptop.post15;

import java.util.HashSet;
import java.util.Set;

public class LaptopSetDemo {

	public static void main(String[] args) {

		Laptop laptop1 = new Laptop("Sony", "Vaio", "Windows7");
		Laptop laptop2 = new Laptop("Toshiba", "Satellite", "Windows8");
		Laptop laptop3 = new Laptop("Apple", "MacBook Pro", "Mac-os");
		Laptop laptop4 = new Laptop("Sony", "Vaio", "Windows8");
		Laptop laptop5 = new Laptop("Apple", "MacBook Pro", "Mac-os");
		
       Set<Laptop> laptops = new HashSet<Laptop>();
		
       laptops.add(laptop1);
       laptops.add(laptop2);
       laptops.add(laptop3);
	   laptops.add(laptop4);
	   laptops.add(laptop5);
		
		for(Laptop alaptop: laptops)
		{
			System.out.println("Make is " + alaptop.getMake());
			System.out.println("Model is " + alaptop.getModel());
			System.out.println("Operating system is " + alaptop.getOperatingSystem());
			System.out.println("*************************");
		}
	}

}
